<template>
  <div class="DetailParams">
    <div class="desc">
      <div class="before_line"></div>
      <div>{{detailInfo.desc}}</div>
      <div class="end_line"></div>
    </div>

    <div class="key">{{detailInfo.key}}</div>

    <div>
      <div class="detailImages">
        <img v-for="item in detailInfo.detailImage" :src="item" alt="" :key="item" @load="bottom_detail_imgload">
      </div>
    </div>

    <div class="rule_table">
      <!-- <div class="rule_desc">{{detailInfo.rule.key}}</div> -->
      <div v-for="(item, index) in detailInfo.tables" :key="item[index]" class="rule_box">
        <div>
          <span v-for="(item2,index) in item" :key="index" class="rule_span">
            {{item2}}
          </span>
        </div>
      </div>
      <!-- <div class="rule_desc">{{detailInfo.rule.disclaimer}}</div> -->
    </div>

    <div class="rule_set">
      <div v-for="(item,index) in detailInfo.rule_set" :key="item[index]" class="rule_set_box">
        <span class="rule_set_key">{{item.key}}</span>
        <span class="rule_set_value">{{item.value}}</span>
      </div>
    </div>    
  </div>
</template>

<script>
export default {
  name: "DetailParams",
  props: {
    detailInfo: {
      type: Object,
      default(){
        return {};
      }
    }
  },
  
  methods: {
    bottom_detail_imgload(){
      this.$bus.$emit("bottom_detail_imgload");
    }
  }
  
}
</script>

<style scoped>
  .desc{
    padding-top: 10px;   
    border-top: 5px solid #f6f6f6;
  }

  .before_line{
    width: 100px;
    height: 1px;
    background-color:grey;
    display: inline-block;
  }

  .desc::before{
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    background-color: grey;
    border-radius: 30%;
    margin-bottom: 0px;
    margin-left: 10px;
  }
  .end_line{
    width: 100px;
    height: 1px;
    background-color:grey;
    display: inline-block;
    margin-left: 250px;
  }
  .desc::after{
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    background-color: grey;
    border-radius: 30%;
    margin-bottom: 0px;
  }

  .desc div:nth-child(2){
    padding: 10px 20px 5px 20px;
    font-size: 14px;
  }
  .key{
    font-size: 14px;
    padding-left: 15px;
    margin-top: 5px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f6f6f6;
  }

  .detailImages img{
    width: 100%;
  }

  .table_box{
    display: flex;
    text-align: center;
    font-size: 10px;
    margin: 30px 0px;
    padding-bottom: 5px;
    border-bottom: 2px solid #f6f6f6;
  }

  .table_box span{
    flex:1;

  }

  .rule_box{
    display: flex;
    margin: 20px 0px;
    font-size: 10px;
    text-align: center;
    padding-bottom: 5px;
    border-bottom: 1px solid #f6f6f6;
  }

  .rule_span{
    flex:1
  }

  .rule_desc{
    font-size: 10px;
    margin: 20px;
  }

  .rule_set_box{
    font-size: 10px;
    margin: 20px 0px;
    padding: 0px 25px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f6f6f6;
  }

  .rule_set_value{
    display: inline-block;
    margin-left: 40px;
    color: deeppink;
  }

  


</style>